Skip to content

Conversation

@donnyh13
Copy link

@donnyh13 donnyh13 commented Nov 5, 2025

Hi Everyone,
This is the Pull Request that I mentioned in Issue #232 . This will fix (I believe) the issues mentioned in the Feature Request, namely COM Objects ending in brackets mistakenly being recognized as user functions, due to the way the TM language file is currently set up.
The second addition I have in my changes is to add a separate recognition for COM Objects, and consequently, also recognition for Map key access using dot notation. This will match Scite’s behaviour where COM Objects and Map keys using Dot notation will be colored the same. The present behaviour is all COM Objects are not tokenized as such.
I have applied a token name that I thought would be fitting, but of course, you would know better whether this will be appropriate or not.
The only other thing, which I brought up in the Feature Request is that currently user Functions without parenthesis after them, are not tokenized as functions. As my example showed, $MyFunc = _Func123 would not be tokenized. My changes currently do NOT fix this. Most likely if I were to do so, I wold just make the Parenthesis search optional with a quantifier. Perhaps someone has a more elegant solution than that.
Best regards,
Donny

donnyh13 and others added 4 commits October 31, 2025 06:48
Simplify regex patterns in autoit.tmLanguage by:
- Consolidating character classes using \w shorthand
- Removing redundant character class combinations
- Streamlining pattern matching for function names and COM object members

These changes improve pattern readability and maintainability while preserving the same matching behavior.
@loganch
Copy link
Owner

loganch commented Nov 7, 2025

Thank you!

@loganch loganch merged commit d58d92e into loganch:master Nov 7, 2025
@donnyh13
Copy link
Author

donnyh13 commented Nov 9, 2025

Welcome! Thanks for the clean up.

@donnyh13 donnyh13 deleted the COM-Objects branch November 9, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants